<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/10/18
 * Time: 15:35
 */
namespace C\lib{
    class verification{
        public static function isOrder($p){
            if (preg_match('/^BD[A-Za-z0-9]{18}$/', $p)) return true;
            else return false;
        }

        public static function isNum($p){

            if(preg_match(' /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/',$p)) return true;
            else return false;
        }
        public static function isOne($p){
            if(preg_match('/^[1-2]{1}$/',$p)) return true;
            else return false;
        }

    }
}